public class Test {
   /* double d = 19.99;
    double k = d *10 %10;
    int j = (int)k;
    int i = 0;
    if(j > 5){
        j+=1;
    }
    i = j;*/
   public static void main(String[] args) {
      int cost = 798;
       if(cost >= 100 && cost < 500){
           cost *= 0.9;
       }else if(cost >= 500 && cost < 2000){
           cost *= 0.8;
       }else if(cost >= 2000 && cost < 5000){
           cost *= 0.7;
       }else if(cost >= 5000){
           cost *= 0.6;
       }


       System.out.println(cost);
   }
   public static void main4(String[] args) {
       int a = 1;
       int b  = 2;
       a = a ^ b;
       b = a ^ b;
       a = a ^ b;
       System.out.println(a);
   }
   public static void main3(String[] args) {
       double d = 19.99;
       int i = (int)(d + 0.5);//直接去掉小数
       System.out.println(i);
   }
   public static void main1(String[] args) {
       double d = 19.99;
       double k = d *10 %10;
       int j = (int)k;
       int i = 0;
       if(j > 5){
           d+=1;
       }
       i = (int)d;
       System.out.println(i);
   }

}
